home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
F1 Licenseware
/
F1 Licenseware - Volume 1.iso
/
disks
/
050a.dms
/
050a.adf
/
TEXTS
/
chapter14.txt
< prev
next >
Wrap
Text File
|
1992-02-26
|
5KB
|
139 lines
The Absolute Beginners Guide To Amos
-------------------------------------
Chapter fourteen
----------------
And now a brief word about the SAY command. This command uses the
Narrator.Device, which can be found in the DEVS drawer on your Amos
system disk or your Workbench disk. For the SAY command to work you must
have the Narrator.Device on the currently used disk as Amos will
automatically attempt to load it before use of the command.
The say command makes your Amiga speak to you in a synthetic voice and can
be very useful in some programs, Educational games for example, where the
Amiga could talk back to the child. Here is the syntax:
SAY "TEXT"
It`s very simple isn`t it? Just type what you want the Amiga to SAY to you
inside quotes, just like the PRINT command. Load EXAMPLE14.Amos for an
ample demonstration.
As you will realize the quality of the speech can be a bit er... let us say
rubbish. If SAY is having problems with a particular word then try changing
the spelling of it, e.g. AMIGA to AMEEGAR.
There are in fact two speech modes for the SAY command, as default your Amos
program will stop while the SAY command does it`s thing but you can set
multitasking on by putting a 1 after your command. This will let your
program continue executing the commands after the SAY command but will
slow your program down a little. An example:
SAY "A LOAD OF RHUBARB",1
The 1 is the multitasking toggle. To return to normal change this to 0.
Don`t forget the text can be a string variable if you need or want it to be.
Like this:
T$="WIBBLEWOBBLE"
SAY T$
YAP$="I LOVE LOLLIPOP LAND"
SAY YAP$,1
You can make some other system changes to the SAY command as follows:
SET TALK sex,mode,pitch,rate
SEX
---
(No puns here please!)
The SEX mode let`s you change between 0 male or 1 female voice, which by the
way does not work very well, you will be better off changing the PITCH value.
Mode
----
Default is 0. If set to 1 then adds a strange rhythmic pattern to the voice
according to the manual?
PITCH
-----
Changes the frequency of the voice from 65 (low) to 320 (incredibly high)
RATE
----
Specifies the speed of the talking in words per minute ranging from 40-400.
quite a bit of fun can be had with this command and if the result was a bit
more realistic it could of been very useful. Personally I think the SAY
command is just a novelty. Commodore must agree as they have now dropped it
from the Workbench disks. If you wanted to reproduce realistic speech a much
better option would be to use real life samples, nice cue that.
SAMPLES:
=======
The easiest way to get samples into Amos and play them is to use the
Amos Sample_Bank_maker provided on the Amos programs disk. This will convert
your samples into an Amos memory bank file (ABK) which you can load into bank
five, the default sample bank.
You can then load your sample bank into your program like this:
Use direct mode (Press Escape) then type in
LOAD "SAMPLES.ABK"
And your samples will be in memory ready for use.
Really there are only three commands you need to use for playing samples
which are as follows,
SAM BANK bank number
SAM LOOP on/off
and
SAM PLAY sample number
SAM BANK
-------
Tells Amos which bank to play your samples from. This could be useful if for
example you wanted more than one set of samples in memory at a time. At this
stage we are sticking to one set of samples from the default bank so we
won't have any need for SAM BANK, but I thought you ought to know.
SAM LOOP
-------
Is just like TRACK LOOP ON or TRACK LOOP OFF, remember that one? SAM LOOP
does actually work properly though, which is nice.
SAM LOOP will continuously play the last played sample forever or until Amos
reaches a SAM LOOP OFF.
SAM PLAY
-------
This actually plays the sample requested from bank five. You can store as
many samples as you want in a bank, memory permitting.
There are a few other commands but we don`t need to look at them at this
stage.
load EXAMPLE14_1.Amos and mess around with that for a while.
The trade off against using sound samples and using the SAY command is of
course memory. Samples of any size will be a lot bigger than the memory used
by SAY, but the quality of most samples are almost life-like.
There are huge amounts of disks full of samples in the Public Domain, or you
can create your own. All you need is a Sampler and a sound source such as a
CD, HI-FI, Walkman or Tape deck.
Proper use of sampled sound effects game bring a game to life, so this is an
area well worth investigating if you intend to write even half decent games.
End of chapter fourteen
^^^^^^^^^^^^^^^^^^^^^^^